import request from '@/utils/request'

export function listBaseNumberCard(query) {
  return request({
    url: '/goods/BaseNumberCard/list',
    method: 'get',
    params: query
  })
}

export function addBaseNumberCard(data) {
  return request({
    url: '/goods/BaseNumberCard',
    method: 'post',
    data
  })
}

export function updateBaseNumberCard(data) {
  return request({
    url: '/goods/BaseNumberCard',
    method: 'put',
    data
  })
}

export function delBaseNumberCard(ids) {
  const target = Array.isArray(ids) ? ids.join(',') : ids
  return request({
    url: `/goods/BaseNumberCard/${target}`,
    method: 'delete'
  })
}

export function handleCardDown(id) {
  return request({
    url: `/goods/BaseNumberCard/handleCardDown/${id}`,
    method: 'put'
  })
}

export function exportBaseNumberCard(query) {
  return request({
    url: '/goods/BaseNumberCard/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

